<!-- 商品规格 -->
<input type="hidden" value="1" name="havespec" />
<div class="goods-spec" id="goods-spec">
	<h4 class="spec-tip"></h4>
	<#if groupbuyIsOn=="ON">
		<!-- 创建商品规格标签 -->
		<#assign goodsSpecTag = newTag("groupBuyGoodsSpecTag") >
		<!-- 调用商品规格标签 -->
		<#assign goodsSpace = goodsSpecTag()!'' >
	<#else>
		<!-- 创建商品规格标签 -->
		<#assign goodsSpecTag = newTag("goodsSpecTag") >
		<!-- 调用商品规格标签 -->
		<#assign goodsSpace = goodsSpecTag()!'' >
	</#if>
	<!-- 规格列表 -->
	<#list goodsSpace.specList as spec>
		<table width="100%" class="spec-item">
			<tbody>
				<tr>
					<td style="width: 10%; white-space: nowrap;"><span><em>${spec.spec_name}</em>：</span></td>
					<td style="padding-left: 15px;">
		 				<ul>
							<#list spec.valueList as val  >
								<#if spec.spec_type==0>
									<li>
										<a specid="${spec.spec_id}" specvid="${val.spec_value_id}"  href="javascript:;" class="<#if val_index == 0>selected</#if>" title="${val.spec_value!''}">
											${val.spec_value!''}
											<span></span>
										</a>
									</li>
								</#if>
								<#if spec.spec_type==1>
									<li>
										<a specid="${spec.spec_id}" specvid="${val.spec_value_id}"  href="javascript:;" class="<#if val_index == 0>selected</#if>" title="${val.spec_value!''}" >
											${val.spec_value!''}
											<span></span>
											<!-- <@image  title="${val.spec_value!''}" alt="${val.spec_value!''}" src="${val.spec_image!''}" /> -->
										</a>
									</li>
								</#if>				
							</#list>
						</ul>
					</td>
				</tr>
			</tbody>
		</table>
	</#list>
</div>
<!-- 商品购买 -->
<div class="rer-quantity" style="margin-top:5px;margin-bottom:0">
	<label>订购数量：</label>
	<div id="num" class="Numinput"></div>						
</div>
<div class="btn-box" style="margin-top:5px;">
	<input type="hidden" name="productid" id="productid"  />
	<input type="hidden" name="action" value="add-product" />

	
	<div class="btn-div">
		<input type="button" class="white-btn" value="暂无库存" <#if goods.store gt 0>style="display:none"</#if> 	goodsid="${goods.goods_id}"/>	
	</div>
	<div class="btn-div">
		<input type="button" class="buynow-btn green-btn" value="立即购买"  id="buyNow" <#if goods.store == 0>style="display:none"</#if>/>			
	</div>
	<div class="btn-div">
		<input type="button" class="addtocart-btn yellow-btn" value="加入购物车"  id="addbutton" <#if goods.store ==  0 || (goods.isvirtual?exists &&goods.isvirtual==1) >style="display:none"</#if>/>	
	</div>
	<div class="btn-div">
		<a href="javascript:void(0);" class="favorite" goodsid="${goods.goods_id}"></a>	
	</div>

</div>
<script type="text/javascript">

var Products=
	[
	<#list goodsSpace.productList as product>	
	  {'product_id':${product.product_id},'goods_id':${product.goods_id},'sn':'${product.sn}','store':${product.store!0},
		'price':${product.price},
	   'specs':${product.specsvIdJson}
	  }
	  <#if product_has_next >,</#if>
	</#list>
	];
$(function(){
	Eop.Spec.init(1);
});

</script>	